# uncompyle6 version 2.15.1
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.10 (default, Jul  1 2017, 13:36:56) 
# [GCC 4.4.6 20110731 (Red Hat 4.4.6-4)]
# Embedded file name: /data/bkce/open_paas/paas/templates_module/saas/list_table.part.py
# Compiled at: 2018-01-02 11:59:03
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
STOP_RENDERING = runtime.STOP_RENDERING
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 10
_modified_time = 1514865543.406814
_enable_loop = True
_template_filename = '/data/bkce/open_paas/paas/templates/saas/list_table.part'
_template_uri = 'saas/list_table.part'
_source_encoding = 'utf-8'
_exports = []

def render_body(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        app_list = context.get('app_list', UNDEFINED)
        STATIC_VERSION = context.get('STATIC_VERSION', UNDEFINED)
        len = context.get('len', UNDEFINED)
        SITE_URL = context.get('SITE_URL', UNDEFINED)
        JS_SUFFIX = context.get('JS_SUFFIX', UNDEFINED)
        STATIC_URL = context.get('STATIC_URL', UNDEFINED)
        total = context.get('total', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'<table data-sortable="" class="table table-hover table-striped" data-sortable-initialized="true">\n    <thead total_app="')
        __M_writer(unicode(total))
        __M_writer(u'">\n        <tr>\n            <th style="width:22%">\u5e94\u7528ID</th>\n            <th style="width:15%">\u5e94\u7528\u540d\u79f0</th>\n            <th style="width:15%">\u521b\u5efa\u8005</th>\n            <th style="width:10%">\u7248\u672c</th>\n            <!-- <th style="width:15%">\u521b\u5efa\u65f6\u95f4</th> -->\n            <th style="width:10%">\u72b6\u6001</th>\n            <th style="width:28%;">\u64cd\u4f5c</th>\n        </tr>\n    </thead>\n    <tbody>\n')
        if app_list:
            for _app in app_list:
                __M_writer(u'            <tr>\n                <td style="vertical-align:middle;">\n                    <div style="margin-right:10px;display: inline-block;">\n                        <a href="###" title="\u70b9\u51fb\u66f4\u6362logo" onclick="BASE_APP.modify_app_logo(\'')
                __M_writer(unicode(_app.code))
                __M_writer(u'\', 1)" style="display: inherit;padding: 0;"><img id="app_logo_now" style=\'width:40px;height:40px\' src="')
                __M_writer(unicode(_app.get_logo_url))
                __M_writer(u'" onerror="javascript:this.src=\'')
                __M_writer(unicode(STATIC_URL))
                __M_writer(u'img/app_logo/default.png\';"></a>\n                    </div>\n                    <a href="')
                __M_writer(unicode(SITE_URL))
                __M_writer(u'saas/info/')
                __M_writer(unicode(_app.code))
                __M_writer(u'/" class="hit" title=\'')
                __M_writer(unicode(_app.code))
                __M_writer(u"'>")
                __M_writer(unicode(_app.code))
                __M_writer(u'</a>\n                </td>\n                <td style="vertical-align:middle;" title="')
                __M_writer(unicode(_app.name))
                __M_writer(u'">\n')
                if len(_app.name) > 15:
                    __M_writer(u'                            ')
                    __M_writer(unicode(_app.name[0:15]))
                    __M_writer(u'...\n')
                else:
                    __M_writer(u'                            ')
                    __M_writer(unicode(_app.name))
                    __M_writer(u'\n')
                __M_writer(u'                </td>\n                <td style="vertical-align:middle;">')
                __M_writer(unicode(_app.creater))
                __M_writer(u'</td>\n                <td style="vertical-align:middle;">')
                __M_writer(unicode(_app.version or '--'))
                __M_writer(u'</td>\n                <!--     \u521b\u5efa\u65f6\u95f4     -->\n                <!-- <td style="vertical-align:middle;">')
                __M_writer(unicode(_app.created_date_display))
                __M_writer(u'</td> -->\n                <!--\u72b6\u6001 -->\n                <td style="vertical-align:middle;">\n')
                if _app.state in (0, 10):
                    __M_writer(u'                        <label class="label label-default">')
                    __M_writer(unicode(_app.saas_state_display))
                    __M_writer(u'</label>\n')
                else:
                    if _app.state in (1, ):
                        __M_writer(u'                        <label class="label label-warning">')
                        __M_writer(unicode(_app.saas_state_display))
                        __M_writer(u'</label>\n')
                    else:
                        if _app.state in (3, 8):
                            __M_writer(u'                            <label class="label label-info">')
                            __M_writer(unicode(_app.saas_state_display))
                            __M_writer(u'</label>\n')
                        else:
                            if _app.state in (4, 9):
                                __M_writer(u'                        <label class="label label-success">')
                                __M_writer(unicode(_app.saas_state_display))
                                __M_writer(u'</label>\n')
                __M_writer(u'                </td>\n                <td style="vertical-align:middle;">\n                    <a href="')
                __M_writer(unicode(SITE_URL))
                __M_writer(u'saas/release/')
                __M_writer(unicode(_app.code))
                __M_writer(u'/" class="hit mr10">\u90e8\u7f72</a>\n')
                if _app.state in (1, ):
                    __M_writer(u'                        <a href="###" onclick="REL_MANAGER.saas_app_del(this, \'')
                    __M_writer(unicode(_app.code))
                    __M_writer(u'\');" app_code="')
                    __M_writer(unicode(_app.code))
                    __M_writer(u'" class="hit saas_app_del mr10">\u5220\u9664</a>\n')
                if _app.state in (0, 3, 4) and _app.is_already_online:
                    __M_writer(u'                        <a href="')
                    __M_writer(unicode(SITE_URL))
                    __M_writer(u'saas/offline/')
                    __M_writer(unicode(_app.code))
                    __M_writer(u'" class="hit mr10">\u4e0b\u67b6</a>\n')
                if _app.state not in (0, 1) and _app.is_already_online:
                    __M_writer(u'                        <a href="')
                    __M_writer(unicode(_app.app_pro_url))
                    __M_writer(u'" target="_blank" class="hit mr10">\u8bbf\u95ee\u5730\u5740</a>\n')
                __M_writer(u'                </td>\n            </tr>\n')

        else:
            __M_writer(u'            <tr id="none">\n                <td colspan="9" style="text-align: center">\u60a8\u8fd8\u6ca1\u6709\u76f8\u5173\u5e94\u7528\u4fe1\u606f\n            </tr>\n')
        __M_writer(u'    </tbody>\n</table>\n<script src="')
        __M_writer(unicode(STATIC_URL))
        __M_writer(u'js/paas_release.')
        __M_writer(unicode(JS_SUFFIX))
        __M_writer(u'?v=')
        __M_writer(unicode(STATIC_VERSION))
        __M_writer(u'"></script>\n<script>\n$(function(){\n    $("#seacher_input").show();\n})\n</script>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()